#ifndef __ZY_CAN_H
#define __ZY_CAN_H
#include "stdint.h"
#include "can.h"

extern CAN_HandleTypeDef            hcan1;
#define CANOPEN_CAN_HANDLE          &hcan1

typedef struct {
  uint32_t id;
  uint8_t rtr;
  uint8_t ide;
  uint8_t len;
  uint8_t data[8];
} can_message_t;


int CAN_Open(uint8_t channel,uint16_t baudrate);
int CanTransmit(uint8_t port,can_message_t* m);

#endif



